<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>js</title>
</head>
<body>
    
    
    <span id='spn' onclick='spa()'>百度一下</span>
    <button onclick='fun(this)'>按钮</button>
    <button onclick='btn(this)'>跳转页面</button>
        


    <script>
    /*作业一*/
     var spn=document.getElementById('spn');
     spn.style.color="#fff";
     spn.style.backgroundColor="pink"
     spn.style.borderRadius="5px"
     function spa(){
              open('http://www.baidu.com')
}
    /*作业二*/
    function fun(funy){
         if(confirm('是否删除？')){
         funy.parentNode.removeChild(funy);
          alert('删除成功')
         }else{
          return
         }
    }
    /*作业三*/
    function btn(){
    location.href = 'http://www.baidu.com';
  }
     function abc(a){
        console.log(a);}
        console.log(abc('hello'));
     

    </script> 
     
</body>
</html>